import request from '@/utils/request'

export default {
    //获取初始化数据
    getPageData(page,limit,id){
        return request.get(`/admin/product/${page}/${limit}?category3Id=${id}`)
    },
    // 保存,新增spu
    saveSpu(data){
        return request.post(`/admin/product/saveSpuInfo`,data)
    },
    // 获取图片
    getSpuPhoto(id){
    return request.get(`/admin/product/spuImageList/${id}`)
    },
    // 获取销售属性
    getSaleAttr(id){
        return request.get(`/admin/product/spuSaleAttrList/${id}`)
    },
    // 编辑的保存
    editSpu(data){
        return request.post(`/admin/product/updateSpuInfo`,data)
    },
    // 删除spu
    deleteSpu(spuid){
        return request.delete(`/admin/product/deleteSpu/${spuid}`)
    }  
}